/*1、略；2、略；
* 3、D------B；4、A；
* 4:为什么在抽象类中构成重载就可以允许非抽象方法存在了？
* 5、B*/
public class Test {
    public static Double Formula(int sequence){//第squence次反弹
        if (sequence == 1){
            return 50.0;
        }
        Double high = Formula(sequence-1)/2;
        return high;
    }
    public static Double Distance(int sequence){//第sequence次落地
        Double sum = 0.0;
        if (sequence == 1){
            return 100.0;
        }else {
            for (int i = 2;i <= sequence;i++){
                sum = sum + Formula(sequence-1)*2;
            }
            return sum + 100;
        }
    }
    public static void main(String[] args) {
        Double c = Formula(10);
        System.out.println("第十次反弹"+ c +"米");
        Double z = Distance(10);
        System.out.println("第10次落地时经过了"+ z + "米");
    }
}
